package com.lsh.oms.core.enums;

/**
 * Created by huangdong on 16/8/1.
 */
public enum StatusMemo {

	/**
     *
	 */
	USER_ORDER(1, "支付成功"),
	MP_ORDER(2, "支付失败");

	private final int code;
	private final String name;

	StatusMemo(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public static String getName(int code) {
		for (StatusMemo c : StatusMemo.values()) {
			if (c.getCode() == code) {
				return c.name;
			}
		}
		return null;
	}

	public int getCode() {
		return code;
	}

	public String getName() {
		return name;
	}
}
